1. /* sdfcnbyf.cpp by K.Tsuru */
  2. // function ID 3700 DRADIX
  3. /*******************************
  4. SDouble class
  5. read constant number from a file
  6. ********************************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. bool SetConstByFile(const char* fname,
  11. SDouble (*pfunc)(const SDouble* c, SDouble (*pf)()),
  12. SDouble (*pfCalcFunc)(), uint ef){
  13. RealSize C;
  14. SDouble q;
  15. bool enough = true;
  16. if(ef == 0) ef = q.EffFig();
  17. C.SetEffFig(ef, C.TEMP_EXTEND);
  18. q = q.ReadNumber(fname, q.MaxSize() + 1u);
  19. q.CloseReadNumber();
  20. //cout << "SetConstByFile() is called by " << fname <<endl;
  21. //Do not check the consistency with pfunc = Pi, E or Log10 to avoid the link
  22. //with three functions.
  23. //If pfCalcFunc == NULL and the figures of q is too small,a syntax error
  24. //will occure in the EntryConst().
  25. C.SetEffFig(0);
  26. if(q.Last() < q.EffFig()+q.Hidden()) enough = false;
  27. else (*pfunc)(&q, pfCalcFunc);
  28. return enough;
  29. }

sdfcnbyf.cpp : last modifiled at 2016/09/05 10:55:36(932 bytes)
created at 2017/10/07 10:22:50
The creation time of this html file is 2017/10/07 11:29:39 (Sat Oct 07 11:29:39 2017).